#include<stdio.h>
#include<math.h>
int main()
{
    int a,i,m;
    printf(" there are following frefect numbers smaller than 100:\n");
    for(a=1;a<1000;a++)
    {
        for(m=0,i=1;i<=a/2;i++)
        if(!(a%i))m+=i;
        if(m==a)
        printf("%4d",a);
    }
}